package com.yh.servlet.admin;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.yh.service.impl.UserServiceImpl;
import com.yh.vo.ZhanfengVO;

//@WebServlet("/admin/user-list.let")
public class UserListServlet extends HttpServlet{
	
	private UserServiceImpl zhanfengService = new UserServiceImpl();
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		List<ZhanfengVO> list = zhanfengService.list();
		req.setAttribute("list", list);
		req.getRequestDispatcher("/admin/user-list.jsp").forward(req, resp);
	}
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doGet(req, resp);
	}
}
